<html>
<head>
   <script language="JScript">
   <!--
   function initAd() {
   document.all.AdLayer.style.posTop = -200;//设置onLoad事件激发以后，广告层相对于固定后的y方向位置
   document.all.AdLayer.style.visibility = 'visible'//设置层为可见
   MoveLayer('AdLayer');//调用函数MoveLayer()
   }
   function MoveLayer(layerName) {
   var x = 1;//浮动广告层固定于浏览器的x方向位置
   var y = 1;//浮动广告层固定于浏览器的y方向位置
   var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;
   var y = document.body.scrollTop + y - diff;
   eval("document.all." + layerName + ".style.posTop = y");
   eval("document.all." + layerName + ".style.posLeft = x");//移动广告层
   setTimeout("MoveLayer('AdLayer');", 20);//设置20毫秒后再调用函数MoveLayer()
   }
   //-->
   </script>

   <!--下面为一个ID为AdLayer的层（如ID名不为AdLayer，上面MoveLayer()内的AdLayer也要作相应修改），包括一张带链接的图片-->
</head>
   
<body>
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text
body text body text body text body text body text body text body text body text

<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
   //initAd();//载入页面后，调用函数initAd()
   </SCRIPT>

 <div id=AdLayer style='background-color:white; position:absolute; width:300px; height:200px; z-index:1; left: 200px; top: 30px'> 
   haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha 
   haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha 
   haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha haha 
 </div> 

</body>
</html>
